<div class="wrapper-bz-page" id="wrapper_page_admin_operate_log">
    <div class="wrapper-bz-filter">
        <div class="filter-item"><span><label>模块:</label><input id="ele_select_module_in_filter_admin_operate_log"
                                                                style="width:100px;"/></span></div>
        <div class="filter-item"><span><label>操作行为:</label><input id="ele_select_action_type_in_filter_admin_operate_log"
                                                                  style="width:100px;"/></span></div>

        <div class="filter-item"><span><label>操作人:</label><input id="ele_input_user_name_in_filter_admin_operate_log"  class="easyui-textbox" style="width:100px;"/></span></div>

        <div class="filter-item"><span><label>描述:</label><input id="ele_input_description_cn_in_filter_admin_operate_log" class="easyui-textbox"
                                                                style="width:100px;"/></span></div>
        <div class="filter-item"><span><label>备注:</label><input id="ele_input_remark_in_filter_admin_operate_log" class="easyui-textbox"
                                                                style="width:100px;"/></span></div>
        <button class="title-tool" id="btn_search_in_filter_admin_operate_log"><i class="fa fa-search"></i>查询</button>
        <button class="title-tool" id="btn_reset_in_filter_admin_operate_log"><i class="fa fa-repeat"></i>重置</button>
    </div>
    <div class="wrapper-bz-body has-upper-filter" >
        <table id="table_admin_operate_log" style="width:100%;height:100%"></table>
    </div>
</div>

<script>
    $(function () {
        var subject = 'admin_operate_log';
        var wrapperPageId = '#wrapper_page_' + subject;
        var tableObject = $("#table_" + subject);
        var configDatagrid = {
            url:'/api/AdminOperateLog/getAdminOperateLogList',
            method: 'post',
            remoteSort:false,
            pageList:[20,50,100],
            pageSize:20,
            pagination:true,
            clickToEdit:false,
            dblclickToEdit:true,
            singleSelect:true,
            rownumbers:false,
            striped:true,
            fitColumns:true,
            fit:true,
            columns:[[
                {field:'id',title:'ID',width:40,hidden:true},
                {field:'create_time',title:'时间',width:120, align:'center'},
                {field:'user_name',title:'操作人',width:80},
                {field:'action_type',title:'操作类型',width:100,formatter:function(value,row,index){
                        if(1 == value){
                            return '<span class="bar-state-in-table bar-normal"">新增</span>';
                        }else if(2 == value){
                            return '<span class="bar-state-in-table bar-waiting">编辑</span>';
                        }else if(3 == value){
                            return '<span class="bar-state-in-table bar-gray"">删除</span>';
                        }
                    }, 'align':'center'},
                {field:'description',title:'描述',width:450},
                {field:'module',title:'功能模块',width:80},
                {field:'remark',title:'备注',width:100},
            ]],
            loadFilter: function(data){
                return loadFilter(data, true);
            },
            toolbar:[
                {
                    text:'<i class="fa fa-refresh" style="color:limegreen"></i> 刷新',
                    plain:true,
                    handler:function(){
                        tableObject.datagrid('reload');
                    }
                }
            ]

        };
        tableObject.datagrid(configDatagrid);
        var searchFieldSelect = ['module','action_type'];
        var searchFieldInput  = ['user_name', 'description', 'remark'];

        var filterZoneConfig = {
            subjectKeyword: subject,
            tableObject : tableObject,
            configDatagrid : configDatagrid,
            searchFieldSelect: searchFieldSelect,
            searchFieldInput: searchFieldInput,
        };
        $(wrapperPageId).refreshAfterSearchTable(filterZoneConfig);
    });
</script>